﻿using System;
using System.Reflection;
using TerryDong.DAL.IDAL;
using TerryDong.Core;
namespace TerryDong.DAL.DALFactory
{
    public sealed class OrderFactory
    {
        // Look up the DAL implementation we should be using
        private static readonly string path =ConfigHelper.GetAppSetting("OrderDAL");

        private OrderFactory() { }

        public static IOrder CreateOrder()
        {
            string className = path + ".Orders";
            return (IOrder)Assembly.Load(path).CreateInstance(className);
        }
       // public static  CreateCategory() {
    }
}
